package model.semantics;

import java.util.List;

import model.State;
import model.TurtleState;

public class TellNode extends Node<Integer> {

    private AggregatorNode<Integer> myArguments;

    public TellNode(AggregatorNode<Integer> argument) {
        myArguments = argument;
    }

    @Override
    public Integer evaluate(State<Integer> state) {
        List<Integer> turtles = myArguments.evaluateList(state);
        ((TurtleState) state).setTurtles(turtles);
        return 0;
    }

}
